﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Araman.Models.UserModels
{
      using Araman.Models;
    using System.Web.Mvc;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using Araman.Resources;
    public class UserPermissionGroup
    {
        [Key()]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int GroupId { get; set; }

        [MaxLength(64, ErrorMessageResourceName = "PermissionGroupName_MaxLength", ErrorMessageResourceType = typeof(LngModelErrors))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "PermissionGroupName_Null", ErrorMessageResourceType = typeof(LngModelErrors))]
        [Display(ResourceType = typeof(LngModelDisplayNames), Name = "PermissionGroupName")]
        public string GroupName { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "PermissionGroupName_LanguageKey_Null", ErrorMessageResourceType = typeof(LngModelErrors))]
        [MaxLength(64, ErrorMessageResourceName = "PermissionGroupName_LanguageKey_MaxLength", ErrorMessageResourceType = typeof(LngModelErrors))]
        [Display(ResourceType = typeof(LngModelDisplayNames), Name = "PermissionGroupName_LanguageKey")]
        public string GroupNameLanguageKey { get; set; }

        public virtual IEnumerable<UserPermission> Permissions { get; set; }
    }
}